<div id="figure_{{ figure.id }}" class="figure">
  <figure style="page-break-inside: avoid">
    <img src="/images/{{ figure.id }}" alt="{{ figure.caption }}" style="width:{{ figure.size }}%">
    {% if figure.caption %}
      <figcaption>
        <span class='figure-number'>Figure <span class='figure-counter'></span>.</span> 
        {{ figure.caption }}
      </figcaption>
    {% endif %}
  </figure>
</div>